package edu.scut.course_management.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import edu.scut.course_management.po.AnswerAttachment;
import edu.scut.course_management.po.Attachment;

/**
 * 数据访问，对应库表 answer_attachment
 * 
 * @author huaming
 */
@Repository
public interface AnswerAttachmentMapper {
    
    // 创建新的记录
    void addAnswerAttachment(List<AnswerAttachment> answerAttachmentList) throws DataAccessException;
    
    // 传入attachment和answerId 插入记录
    void addAnswerAttachmentByAttachmentsAndAnswerId(@Param("attachments")List<Attachment> attachments, @Param("answerId")Integer answerId) throws DataAccessException;
}
